<?php

/**
 * model_activitys
 */

class Model_activitys extends YOU {

	public function __construct()
	{
		parent::__construct();
	}

	/** 读取总数 **/
	public function count()
	{
		$row = $this->db->fetchRow("SELECT COUNT(1) AS count FROM `tbl_activitys`");
		return (int)$row['count'];
	}

	/** 读取列表 **/
	public function getAll($field = "*")
	{
		$activitys_lists = $this->db->fetchAll("SELECT {$field} FROM `tbl_activitys` ");

		return $activitys_lists;
	}
	/** 读取活动单条信息 **/
	public function getRow($activitys_id, $field = "*")
	{	
		$activitys_data = $this->db->fetchRow("SELECT {$field} FROM `tbl_activitys` WHERE activitys_id='{$activitys_id}'");

		return $activitys_data;
	}


}



?>